Home

Operator Usage

Name

arithmetic

Description

arithmetic(one, symbol, two)
one and two are converted to kets (for now), and then processed using the symbol type
possible types are: + - * / % ^
ie, addition, subtraction, multiplication, division, modulus, power
Note that categories are preserved, and if the categories differ, return the empty ket |>
If one of the kets has a category, and the other doesn't, then the result will have that category too
now implemented as: (one ++ two), (one -- two), (one ** two), (one // two), (one %% two), (one ^^ two)


Examples

arithmetic(|2>, |+>, |3>)
    |5>

arithmetic(|2>, |*>, |3>)
    |6>

(|number: 2> ++ |number: 7>)
    |number: 9>

(|23> %% |7>)
    |2>


See also

Operator type

function 3